Skip to content

Conversation

@hjmjohnson
Copy link
Contributor

CMake "option" only allows boolean ON|OFF values to
be set as cmake CACHE variables. The
value of CUDACOMMON_CUDA_VERSION is expected to be
a VERSION string like 12.9 or 11.2 which is not
compatible with the cmake "option".

The subsequent
find_package(CUDAToolkit EXACT ${CUDACOMMON_CUDA_VERSION})

Requires the value after EXACT to be a valid version
string (i.e. ON or OFF are invalid choices).

If not set from the command line, default the value
of CUDACOMMON_CUDA_VERSION to the version that was
previously found.

CMake "option" only allows boolean ON|OFF values to
be set as cmake CACHE variables.  The
value of CUDACOMMON_CUDA_VERSION is expected to be
a VERSION string like 12.9 or 11.2 which is not
compatible with the cmake "option".

The subsequent
find_package(CUDAToolkit EXACT ${CUDACOMMON_CUDA_VERSION})

Requires the value after EXACT to be a valid version
string (i.e. ON or OFF are invalid choices).

If not set from the command line, default the value
of CUDACOMMON_CUDA_VERSION to the version that was
previously found.
@hjmjohnson
Copy link
Contributor Author

@SimonRit A fix for cmake build setting of the CUDACOMMON_CUDA_VERSION variable.

@SimonRit
Copy link
Collaborator

Superseded by #86 (just a style adjustment to make pre-commit happy).

@SimonRit SimonRit closed this Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants